

import Home   from '../views/home'
import Main   from '../views/home/main'
import My     from '../views/home/my'
import Login  from '../views/login'
import Record from '../views/record'
import Detail from '../views/record/detail' 
import isLogin from '../until/isLogin'
import Health  from '../views/health'
import Store  from '../views/shop'
import DetailMap from '../views/shop/detailMap'
import Trip   from '../views/health/trip'

const routers = [
    {
        path:'/home',
        component:Home,
        children:[
            {
                path:'/home/main',
                component:Main
            },
            {
                path:'/home/my',
                component:isLogin(My)
            },
            {
                from:'/home',
                to:'/home/main'
            }
        ]   
       
    },
    {
        path:'/login',
        component:Login
    },
    {
        path:'/record/:index',
        component:isLogin(Record),   
       
    },
    {
        path:'/healthsubmit',
        component:isLogin(Health)
    },
    {
        path:'/trip',
        component:isLogin(Trip)
    },
    {
        path:'/detail/:id',
        component:isLogin(Detail)
    },
    {
        path:'/storesearch',
        component:Store
    },
    {
        path:'/detailmap',
        component:DetailMap
    },
    {
        from:'/',
        to:'/home'
    }
]


export default routers